"""文章评论"""
from datetime import datetime

from fastapi import Form
from pydantic import BaseModel


class NewsCommBase(BaseModel):   # 与数据库表响应
    neco_id: int
    neco_contant: str
    neco_date: datetime
    created_at: datetime
    updated_at: datetime


class NewsCommCreate(NewsCommBase):
    neco_contant: str
    neco_date: datetime
    created_at: datetime


class NewsCommRead(NewsCommBase):
    neco_contant: str
    neco_date: datetime
    created_at: datetime

class NewsCommUpdate(NewsCommBase):
    neco_contant: str
    neco_date: datetime
    created_at: datetime

class NewsCommDelete(NewsCommBase):
    pass

    class Config:
        """兼容ORM模型,为模型实例"""
        orm_mode = True

